import java.util.Comparator;

/**
 * this class used for dijkstra algorithm
 * @author ldong
 *
 */

public class DijkstraComparator implements Comparator <Record>
{

	@Override
	public int compare(Record o1, Record o2) {
		
		if(o1.getPathDistance() - o2.getPathDistance() > 0)
			return 1;
		else if (o1.getPathDistance() - o2.getPathDistance()<0)
			return -1;
		else
		  return 0;
	}

}
